import axios from '@/utils/request'

export function employeePage(params) {
  return axios({
    url: '/shop/employee/page',
    method: 'get',
    params
  })
}

export function deleteEmployee(id) {
  return axios({
    url: '/shop/employee/del',
    method: 'get',
    params:{
      id: id
    }
  })
}

export function deleteEmpBatch(ids) {
  return axios({
    url: '/shop/employee/delBatch',
    method: 'get',
    params:{
      ids: ids
    }
  })
}

export function addEmp(data) {
  return axios({
    url: '/shop/employee/add',
    method: 'post',
    data
  })
}

export function empInfo(id) {
  return axios({
    url: '/shop/employee/empInfo',
    method: 'get',
    params: {
      id: id
    }
  })
}

export function updateEmp(data) {
  return axios({
    url: '/shop/employee/update',
    method: 'post',
    data
  })
}
